package com.blockmeta.bbs.immodule.widget;

import android.content.Context;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.blockmeta.bbs.baselibrary.widget.popupview.BaseBottomPopupWindow;
import com.blockmeta.bbs.businesslibrary.widget.RoundCornerTextView;
import com.blockmeta.bbs.immodule.R;
import com.blockmeta.bbs.immodule.net.pojo.Notice;


public class Popup_Circle_Notice extends BaseBottomPopupWindow implements View.OnClickListener {

    RoundCornerTextView mBtnIknow;
    TextView mTvContent;


    public Popup_Circle_Notice(Context context, Notice notice) {
        super(context);
        bindNotice(notice);
    }

    private void bindNotice(Notice notice) {
        mTvContent.setText(notice.getContent());
    }


    @Override
    public int getResId() {
        return R.layout.im_popup_notice;
    }

    @Override
    protected void bindEvent() {

        mBtnIknow = (RoundCornerTextView) findViewById(R.id.im_popup_sys_btn_action);
        mBtnIknow.setOnClickListener(this);
        mTvContent = (TextView) findViewById(R.id.im_popup_sys_msg);

    }

    @Override
    public View getClickToDismissView() {
        return popupView.findViewById(R.id.rlayout_notice_pop_container);
    }


    @Override
    public void onClick(View v) {
        if (v.getId() == R.id.ibtn_qiang) {

        } else if (v.getId() == R.id.im_popup_sys_btn_action) {
            dismiss();
        }
    }

    public void showPop() {
        if (!isShowing()) {
            showPopupWindow();
        }
    }

    @Override
    public View initAnimaView() {
        return null;
    }
}
